﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Mangosoft.DiceCopy.Application.MainBoundedContext.DTO;
using Mangosoft.DiceCopy.DistributedServices.Seedwork.ErrorHandlers;

namespace Mangosoft.DiceCopy.DistributedServices.MainBoundedContext {
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IJobHuntingModuleService”。
    [ServiceContract]
    public interface IJobHuntingModuleService {      

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        JobseekerDTO FindJobseeker(Guid id);

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        List<JobseekerDTO> FindJobseekers();

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        List<NewsDTO> FindNews();

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        List<NewsDTO> FindNewsByChannel(int channel);

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        List<AdvertisingDTO> FindAdvertisingsByBlock(int blockcodel);

        [OperationContract]
        [FaultContract(typeof(ApplicationServiceError))]
        ResumeDTO AddNewResume(ResumeDTO resume);

        #region CoverLetter's AppService Interface
        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        CoverLetterDTO AddNewCoverLetter(CoverLetterDTO coverLetter);

        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        void UpdateCoverLetter(CoverLetterDTO coverLetter);

        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        void RemoveCoverLetter(Guid coverLetterId);

        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        CoverLetterDTO FindCoverLetter(Guid coverLetterId);

        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        List<CoverLetterDTO> FindCoverLetters(string text);
        #endregion
    }
}
